//
//  LuckyRecordsTableViewCell.m
//  lmq
//
//  Created by 马田成 on 2017/4/5.
//  Copyright © 2017年 yuanxin. All rights reserved.
//

#import "LuckyRecordsTableViewCell.h"
#import "LuckyRecordsModel.h"
#import "UIImageView+WebCache.h"

@implementation LuckyRecordsTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
- (IBAction)LookAtWL:(UIButton *)sender {
    if (self.block) {
        self.block(sender);
    }
    
}

- (void)callBackEditBlock:(EditBlock)block{

    self.block = block;
    
    
}

- (void)setModelOfLucky:(LuckyRecordsModel *)modelOfLucky{

//    NSString *strPic = @"http://lmq.quyum.cn/";
//    
//    NSString *str = [strPic stringByAppendingString:modelOfLucky.pic];
//    
    NSString *urlWare=modelOfLucky.pic;
    NSString *str=manage(AP_HOST, urlWare);
    NSString *strUrl = [str stringByReplacingOccurrencesOfString:@"\\" withString:@"/"];
    
    [self.picImageView sd_setImageWithURL:[NSURL URLWithString:strUrl]];
    
    self.titleLabel.text = modelOfLucky.shop_name;
    self.qiHaoLabel.text = modelOfLucky.stage;
    self.peopleNumLabel.text = modelOfLucky.purchase;
    self.luckyNumLabel.text = modelOfLucky.code;
    self.joinNumLabel.text = modelOfLucky.num;
    self.timeLabel.text = modelOfLucky.time;
    
    

}

@end
